﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="TN5YProjectFormControl.ascx.cs"
    Inherits="TeamTime.TN5YProjectFormControl" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="ajaxToolkit" %>
<%@ Register Src="LabelWithTimedMsg.ascx" TagName="LabelWithTimedMsg" TagPrefix="uc1" %>

<asp:TextBox ID="txtCompanyID" runat="server" Visible="false"></asp:TextBox>
<asp:CheckBox ID="chkSuccessfullySaved" runat="server" Visible="false"></asp:CheckBox>
<asp:Panel runat="server" ID="pnlDetails" SkinID="PopupPanel" DefaultButton="btnSave"
    Width="600px">
    <table cellspacing="0" width="590px">
        <tr id="trID" runat="server" visible="false">
            <td>
                ID
            </td>
            <td >
                <asp:TextBox ID="txtID" runat="server" ReadOnly="true" BackColor="#E0E0E0" BorderStyle="None"></asp:TextBox>&nbsp;
            </td>
        </tr>
        <tr>
            <td>
                Project Name
            </td>
            <td >
                <asp:TextBox ID="txtProjectName" runat="server" Width="274px" MaxLength="510" ReadOnly="true"></asp:TextBox>
            </td>
            <td>
                <asp:RequiredFieldValidator ID="reqValProjectName" runat="server" Display="Dynamic"
                    ErrorMessage="* Required" ValidationGroup="addform" ControlToValidate="txtProjectName"></asp:RequiredFieldValidator>
            </td>
            <td>
                &nbsp;
            </td>
        </tr>
        <tr>
            <td>
                Company
            </td>
            <td colspan="4">
                <asp:TextBox ID="txtCompanyName" runat="server" Width="200px"></asp:TextBox>
                <ajaxToolkit:AutoCompleteExtender ID="extCompanyName" runat="server" EnableCaching="true"
                    MinimumPrefixLength="1" OnClientPopulated="hide2" OnClientPopulating="show2"
                    ServiceMethod="getCompanies" ServicePath="AutoComplete.asmx" SkinID="AutoCompleteExtender"
                    TargetControlID="txtCompanyName" />
                <img id="imgProg2" src="App_Themes/Default/Images/ajaxloader.gif" alt="prog" style="visibility: hidden;" />
                <asp:RequiredFieldValidator ID="reqValCompanyName" runat="server" Display="Dynamic"
                    ErrorMessage="* Required" ValidationGroup="addform" ControlToValidate="txtCompanyName" ></asp:RequiredFieldValidator>
                <script type="text/javascript">
                    function show2() {
                        var ctrlid = 'imgProg2';
                        document.getElementById(ctrlid).style.visibility = 'visible';
                    }
                    function hide2() {
                        var ctrlid = 'imgProg2';
                        document.getElementById(ctrlid).style.visibility = 'hidden';
                    }
                </script>

                

            </td>
        </tr>
        <tr>
            <td>
                Category
            </td>
            <td >
                <asp:TextBox ID="txtCategory" runat="server" Width="246px" MaxLength="510" ReadOnly="true"></asp:TextBox>
            </td>
            <td>
                &nbsp;
            </td>
            <td>
                &nbsp;
            </td>
        </tr>
        <tr>
            <td>
                Priority
            </td>
            <td >
                <asp:TextBox ID="txtPriority" runat="server" Width="148px" MaxLength="510" ReadOnly="true"></asp:TextBox>
            </td>
            <td>
                &nbsp;
            </td>
            <td>
                &nbsp;
            </td>
        </tr>
        <tr>
            <td>
                Status
            </td>
            <td >
                <asp:TextBox ID="txtStatus" runat="server" Width="274px" MaxLength="510" ReadOnly="true"></asp:TextBox>
            </td>
            <td>
                &nbsp;
            </td>
            <td>
                &nbsp;
            </td>
        </tr>
        <tr>
            <td>
                Begin
            </td>
            <td >
                <clib:TextBoxCalendar ID="calBegin" runat="server" ReadOnly="false" EnableViewState="true"
                    ClearText="" ErrorMessage="*Required" Required="True" 
                    ValidationGroup="addform">
                </clib:TextBoxCalendar>
            </td>
            <td>
                &nbsp;
            </td>
            <td>
                &nbsp;
            </td>
        </tr>
        <tr>
            <td>
                End
            </td>
            <td >
                <clib:TextBoxCalendar ID="calEnd" runat="server" ReadOnly="false" EnableViewState="true"
                    ClearText="" ErrorMessage="*Required" Required="False" 
                    ValidationGroup="">
                </clib:TextBoxCalendar>
            </td>
            <td>
                &nbsp;
            </td>
            <td>
                &nbsp;
            </td>
        </tr>
        <tr>
            <td>
                Budget
            </td>
            <td >
                <asp:TextBox ID="txtBudget" runat="server" Width="169px" MaxLength="8" 
                    ReadOnly="true"></asp:TextBox>
            </td>
            <td>
                &nbsp;
            </td>
            <td>
                &nbsp;
            </td>
        </tr>
        <tr>
            <td>
                PONumber
            </td>
            <td >
                <asp:TextBox ID="txtPONumber" runat="server" Width="169px" MaxLength="8" 
                    ReadOnly="true"></asp:TextBox>
            </td>
            <td>
                &nbsp;
            </td>
            <td>
                &nbsp;
            </td>
        </tr>
        <tr>
            <td>
                Notes
            </td>
            <td >
                <asp:TextBox ID="txtNotes" runat="server" Width="200px" MaxLength="2000" ReadOnly="true"></asp:TextBox>
            </td>
            <td>
                &nbsp;
            </td>
            <td>
                &nbsp;
            </td>
        </tr>
        <tr id="trSaveButton" runat="server">
            <td colspan="2" align="center" style="text-align: right">
                <asp:Button ID="btnSave" runat="server" Text="Save" ValidationGroup="addform" OnClick="btnSave_Click"
                    UseSubmitBehavior="true" />
                <uc1:LabelWithTimedMsg ID="lblSaveMessage" runat="server" />
            </td>
        </tr>
        <tr id="trModif" runat="server" visible="true">
            <td colspan="2">
                Modified By&nbsp;
                <asp:TextBox ID="txtUserNameModifiedBy" runat="server" Width="137px" MaxLength="4"
                    ReadOnly="true" BackColor="#E0E0E0" BorderStyle="None"></asp:TextBox>
                On
                <asp:TextBox ID="txtRecordDate" runat="server" Width="62px" MaxLength="10" ReadOnly="true"
                    BackColor="#E0E0E0" BorderStyle="None"></asp:TextBox>&nbsp;
            </td>
        </tr>
    </table>
</asp:Panel>
